Complexity of Context - free Grammars with Exceptionsand

نویسنده

  • Romeo Rizzi
چکیده

This report has been submitted forr publication outside of ITC and will probably be copyrighted if accepted for publication. It has been issued as a Technical Report forr early dissemination of its contents. In view of the transfert of copy right too the outside publisher, its distribution outside of ITC priorr to publication should be limited to peer communications and specificc requests. After outside publication, material will be available only inn the form authorized by the copyright owner. Abstract The Standard Generalized Markup Language (SGML) and the Extensible Markup Language (XML) allow authors to better transmit the semantics in their documents by explicitly specifying the relevant structures in a document or class of documents by means of document type deenitions (DTDs). Several authors proposed to regard DTDs as extended context-free grammars expressed in a notation similar to extended Backus{Naur form. In addition, the SGML standard allows to modify the semantics of content models (the right-hand side of productions) by exceptions. Inclusion exceptions allow named elements to appear anywhere within the content of a content model, and exclusion exceptions preclude named elements from appearing in the content of a content model. Since XML does not allow exceptions, the problem of exception removal has received much interest recently. Motivated by this, Kilpel} ainen and Wood proved that exceptions do not increase the expressive power of extended context-free grammars and that for each DTD with exceptions, we can obtain a structurally equivalent extended context-free grammar. Since their argument was based on an exponential simulation, they also conjectured that an exponential blow-up in the size of the grammar is a necessary devil when purging exceptions away. We prove their conjecture under the most realistic assumption that NP-complete problems do not admit non-uniform polynomial time algorithms. Kilpel} ainen and Wood also asked whether the parsing problem for extended context-free grammars with exceptions admits eecient algorithmic solution. We show the NP-completeness of the very basic problem: given a string w and a context-free grammar G (not even extended) with exclusion exceptions (no addition exceptions needed), decide whether w belongs to the language generated by G. Our results and arguments suggest that extended context-free grammars do not provide a suitable model of SGML, especially when one is interested in understanding issues related to exceptions.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Partially Ordered Multiset Context-free Grammars and Free-word-order Parsing

We present a new formalism, partially ordered multiset context-free grammars (pomsCFG), along with an Earley-style parsing algorithm. The formalism, which can be thought of as a generalization of context-free grammars with partially ordered right-hand sides, is of interest in its own right, and also as infrastructure for obtaining tighter complexity bounds for more expressive context-free forma...

متن کامل

A CKY parser for picture grammars

We study the complexity of the membership or parsing problem for pictures generated by a family of picture grammars: Siromoney’s Context-Free Kolam Array grammars (coincident with Matz’s context-free picture grammars). We describe a new parsing algorithm, which extends the Cocke, Kasami and Younger’s classical parsing technique for string languages and preserves the polynomial time complexity.

متن کامل

On state-alternating context-free grammars

The state-alternating context-free grammars are introduced, and the language classes obtained from them are compared to the classes of the Chomsky hierarchy as well as to some well-known complexity classes. In particular, the state-alternating context-free grammars are compared to the alternating context-free grammars of Moriya (1989) and to the alternating pushdown automata. Further, various d...

متن کامل

On Translating Lambek Grammars with One Division into Context-Free Grammars

In this paper we describe a method of translating a Lambek grammar with one division into an equivalent context-free grammar whose size is bounded by a polynom from the size of the original grammar. Earlier constructions by Buszkowski and Pentus lead to exponential growth of the grammar size. 1 Lambek Grammars and Context-Free Gram-

متن کامل

Synchronous Context-Free Grammars and Optimal Linear Parsing Strategies

Synchronous Context-Free Grammars (SCFGs), also known as syntax-directed translation schemata [AU69, AU72], are unlike context-free grammars in that they do not have a binary normal form. In general, parsing with SCFGs takes space and time polynomial in the length of the input strings, but with the degree of the polynomial depending on the permutations of the SCFG rules. We consider linear pars...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2001